package com.xyy.saas.payment.dao.mapper;

import com.xyy.saas.payment.dao.model.RoyaltyOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoyaltyOrderMapper {
    int deleteByPrimaryKey(Long id);

    int insert(RoyaltyOrder record);

    int insertSelective(RoyaltyOrder record);

    RoyaltyOrder selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(RoyaltyOrder record);

    int updateByPrimaryKey(RoyaltyOrder record);

    List<RoyaltyOrder> selectRoyaltyOrderByPayNo(String payNo);

    List<RoyaltyOrder> selectRoyaltyOrderByPayNoAndUserId(@Param("payNo")String payNo, @Param("userId") String userId);

    int updateStatusByPrimaryKeyList(@Param("ids") List<Long> ids, @Param("status") Byte status);

    int updateFeePayeeByPayNo(@Param("payNo") String payNo,@Param("payeeId") String payeeId,@Param("amountType") Byte amountType);

    List<RoyaltyOrder> selectRoyaltyOrderByPayNosAndUserId(@Param("payNos")List<String> payNos, @Param("userId") String userId);

    int updateSettleOrderNoByPrimaryKey(@Param("id") Long id, @Param("settleOrderNo") String settleOrderNo);

    List<RoyaltyOrder> selectRoyaltyOrderBySettleNo(@Param("settleOrderNo")String settleOrderNo);

}